answer color
Type
command
Summary
Displays the operating system's standard color-selection dialog box.
Syntax
answer color [with <startingColor>]
Description
Use the answer color command to select a custom color.
The answer color command displays a dialog box where the user can select a color. (This dialog box is displayed by the operating system, not by LiveCode.)
If you specify a startingColor, the dialog box displays that color by default.
The color is returned in the form of three comma-separated integers between zero and 255, specifying the level of each of red, green, and blue. This format can be used directly to set any color property.
Parameters
Name | Type | Description |
---|---|---|
startingColor | A color reference in one of the following forms:
|
Examples
answer color
if theItem is "Custom Color..." then answer color
answer color with "#FF0033"
answer color with "AliceBlue"
Related
command: answer
control structure: function
function: result, colorNames
glossary: dialog box, variable, command, return, color reference
keyword: it
property: backgroundColor, colors, foregroundColor
Compatibility and Support
Introduced
LiveCode 1.1
OS
mac
windows
linux
Platforms
desktop